/**
 * createby : lbj
 * date : 2018/8/6
 * desc :
 **/
package com.example.demo.core.bean;

import org.springframework.beans.factory.annotation.Value;
import org.springframework.context.annotation.PropertySource;
import org.springframework.stereotype.Component;

import java.io.File;

@Component
@PropertySource({"classpath:/bean.properties"})
public class ConfigBean {

    @Value("${filepath}")
    public String FILE_PATH;

    @Value("${projecthouse}")
    public String PROJECT_HOUSE;


    /**
     * 获得磁盘路径
     * @return 磁盘路径
     */
    public String getDisk() {
        File path = new File(PROJECT_HOUSE);
        return path.getPath().substring(0, 1);
    }


}
